#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>
#include <QTimer>
#include <QLCDNumber>
#include <QLabel>
#include <QResizeEvent>

class Board;
class MainWindow : public QWidget
{
    Q_OBJECT
public:
    explicit MainWindow(QWidget *parent = 0);

    void startGame(int gameType);

    void switchGame(int gameType);

    void resetTimer(bool isReset);
    void pauseTimer();

    void updateStep(bool isRed,int step);

signals:
    void timeoutEvent(int value);

public slots:
    void updateTime();

private:
    Board* board;
    QTimer *timer;
    int m_secCnt;

    QLCDNumber* lcdTimer;//计时器显示
    QLCDNumber* lcdRed; //红方步数
    QLCDNumber* lcdBlack; //黑方步数
};

#endif // MAINWINDOW_H
